package com.study.entity.emuns;


public enum StatusCode {
    OK(200, "成功"),
    ERROR(500, "服务器内部错误"),
    NOT_FOUND(404, "资源未找到"),
    BAD_REQUEST(400, "请求参数错误"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问");

    // 状态码
    private final int code;
    // 描述信息
    private final String message;

    StatusCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
